<?php

/**
 * 报价记录
 */

namespace App\Models\MainDB\Auction;

use App\Traits\BelongsToUserData;
use App\Traits\BelongsToUserRoom;
use Illuminate\Database\Eloquent\Model;

class AuctionRecord extends Model
{
    use BelongsToUserData, BelongsToUserRoom;
    protected $table = 'ln_auction_record';

    protected $fillable = [
        'id',
        'user_id',
        'room_id',
        'auction_id',
        'total_cost', //总花费金币
        'current_cost', //本次报价金币
        'add_time',
        'number',
        'is_final', //是否最终成交记录
    ];

    public $timestamps = false;

    public function auction()
    {
        return $this->belongsTo('App\Models\MainDB\Auction\Auction', 'auction_id', 'id');
    }
}
